package cn.wolfcode.trip.base.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
public class Advertisement {
    private Long id;

    private String content;

    private String title;

    public String getJson(){
        Map<String,Object> map = new HashMap<>();
        //将需要的数据添加到map集合中
        map.put("id",id);
        map.put("content",content);
        map.put("title",title);
        return JSON.toJSONString(map);
    }
}